﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;

namespace GeometryMod.Models
{
    public static class VectorExtensions
    {
        public static Vector3 ToUnitVector(this Vector3 v)
        {

            var allL = v.X * v.X + v.Y * v.Y + v.Z * v.Z;

            var delta =(float) Math.Sqrt(allL);
            return new Vector3(v.X / delta, v.Y / delta, v.Z / delta);
        }
    }
}
